/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.edu.kamai.xmlparser.reading;

import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;

/**
 *
 * @author xyzhu
 */
public class reading {
    
    public reading(){
        
    }
    
    public reading(Hashtable<Integer,String> k,
            Hashtable<Integer,String> a){
        keys = k;
        answer = a;
    }
    
    public List<Integer> check(){
        
        //Enumeration ansEnum = key.keys();
        List<Integer> ret = new ArrayList<Integer>();
        for(Iterator Itr = keys.keySet().iterator();
                //Iterator kItr = key.keySet().iterator();
                Itr.hasNext();){
            Integer ID = (Integer)Itr.next();
            String key = keys.get(ID);
            String ans = answer.get(ID);
            if( !key.equalsIgnoreCase(ans)){
                ret.add(ID);
            }
        }
        return ret;
    }
    
    
    private Hashtable<Integer,String> keys;
    private Hashtable<Integer,String> answer;
}
